package com.example.demo.service;


import com.example.demo.mapper.MessageInfoMapper;
import com.example.demo.model.MessageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MessageService {
    @Autowired
    private MessageInfoMapper messageInfoMapper;
    public void publish(MessageInfo messageInfo) {
        messageInfoMapper.addMessage(messageInfo);


    }

    public List<MessageInfo> queryAll() {
        return messageInfoMapper.queryAll();
    }
}
